<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>3469：ADERA </title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">ADERA </a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">ADERA </span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                ADERA                 </h1>
                <p>时间限制：10s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><div class="Section0">
<p class="p0" style="margin: 9.25pt -1.5pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Adera</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">是</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Microsoft&nbsp;Windows&nbsp;8</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">应用商店中的一款</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Xbox</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">解谜游戏，主线以女主角</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Jane&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -1.5pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Sinclair</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">的探险经历展开。随着探险的不断深入，</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Jane&nbsp;Sinclair</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">获得的物品越来越多，因此她</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">急需一套物品评估查询的系统。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 3.25pt -1.5pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Jane&nbsp;Sinclair</span><span style="color: rgb(0,0,0); font-family: '宋体'; letter-spacing: -0.1pt; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; letter-spacing: -0.1pt; mso-spacerun: 'yes'">身上有</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">n</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">件物品，编号为</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">0~n-1</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，每件物品有一个不同于其它物品的价值，</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">并且可以用一些小写英文字母构成的单词来描述这件物品。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Jane&nbsp;Sinclair</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">想通过这套系统查</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">m</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">条信息，每条查询包含一个整数</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">t</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">和一个字符串</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">s</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">。如果描述一件物品的单词中，有以</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -1.5pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">s</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">为前缀的单词，那么这件物品是对</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Jane&nbsp;Sinclair</span><span style="color: rgb(0,0,0); font-family: '宋体'; letter-spacing: -0.1pt; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; letter-spacing: -0.1pt; mso-spacerun: 'yes'">有用的。她想知道在这条查询中，对她有</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; letter-spacing: -0.1pt; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 3.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">用的物品一共有多少个，并且她还想了解对她有用的物品中价值前</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">t</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">大的物品的编号是什么。</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">现在就请你帮忙设计一下这个系统吧。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 10pt; margin-right: -1.1pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 7pt; margin-right: -1.1pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 9.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
</div></p><hr/><h3>输入格式</h3><p><p class="p0" style="margin: 9.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">第一行两个整数</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">n,m</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，分别表示物品个数和查询条数。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">接下来</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">n</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">行，每行首先是一个整数</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">rating</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，表示该物品的价值，然后是一个整数</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">k</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，表示描述该物品的单词个数；接下来</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">k</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">个小写英文字母构成的字符串，描述这件物品。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">接下来</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">m</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">行，每行一个整数</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; letter-spacing: -0.05pt; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; letter-spacing: -0.05pt; mso-spacerun: 'yes'">ti</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">和一个字符串</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; letter-spacing: -0.05pt; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; letter-spacing: -0.05pt; mso-spacerun: 'yes'">si</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，表示一条询问。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 10pt; margin-right: -1.1pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 7pt; margin-right: -1.1pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 9.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p></p><hr/><h3>输出格式</h3><p><p class="p0" style="margin: 9.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">对于每条询问，首先输出在这次询问中对</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">Jane&nbsp;Sinclair</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">有用的物品总个数</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">tot</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">；然后按顺</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 3.25pt -3pt 0pt 18pt; line-height: 12.25pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">序输出</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">t</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">个整数，表示对她有用的物品中价值前</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">t</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">大的物品的编号。如果</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">t&gt;tot</span><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，只需输出</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">tot</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">个即可。每行内相邻两个整数之间用一个空格隔开，行末是一个回车符，没有空格。</span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 10pt; margin-right: -1.1pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin-top: 0pt; margin-bottom: 0pt; line-height: 7pt; margin-right: -1.1pt"><span style="font-size: medium"><span style="color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span></span><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 6.5pt -3.75pt 0pt 18pt; line-height: 13.5pt"><span style="font-size: 10.5pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p></p><hr/><h3>样例输入</h3><pre>3 3
1 1 admin 
2 2 freda adera
3 1 adver 
10 ad 
1 f 
2 miao </pre><hr/><h3>样例输出</h3><pre>3 2 1 0 
1 1 
0 </pre><hr/><h3>提示</h3><p><p class="p0" style="margin: 3.25pt -3pt 0pt 39pt; line-height: 12.75pt"><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">对于</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">100%</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">的数据，</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">1&lt;=n,m&lt;=100000</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">0&lt;rating&lt;=10^9</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，每两件物品的</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">rating</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">均不相同，</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">描述物品的所有单词总长度不超过</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">100000</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，所有询问的</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">s</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">的总长度不超过</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">100000</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">，所有询</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<p class="p0" style="margin: 4.25pt -3pt 0pt 18pt; line-height: 12.75pt"><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">问的</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">t</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">的和不超过</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"> </span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">500000</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: '宋体'; mso-spacerun: 'yes'">。</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'">&nbsp;</span><span style="font-size: 11pt; color: rgb(0,0,0); font-family: 'Times New Roman'; mso-spacerun: 'yes'"><o:p></o:p></span></p>
<!--EndFragment--></p><hr/><h3>题目来源</h3><p>Adera 2 杯省选模拟赛</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=3469" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=3469" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>